package com.most.goods.controller;

import com.most.api.UserClient;
import com.most.goods.dto.Goods;
import com.most.goods.dto.People;
import com.most.goods.service.GoodsService;
import com.most.goods.service.PeopleService;
import com.most.redis.RedisUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sysPeople")
@RefreshScope
@Api(tags = "人员模块")
public class PeopleController {

    @Autowired
    PeopleService peopleService;



    @GetMapping("/add")
    @ResponseBody
    public People add() {
         return peopleService.add();
    }


    @GetMapping("/addError")
    @ResponseBody
    public void addError() {
        peopleService.addError();
    }


}